<template>
  <section style="padding: 20px; color: red;">Vue App</section>
</template>
<script>
import actions from '@/shared/actions'
export default {
  name: 'Home',

  mounted() {
    actions.onGlobalStateChange((state, prev) => {
      // 处理状态变化
      // state: 变更后的状态; prev 变更前的状态
      console.log('vue子应用状态发生改变', state, prev)
    }, true)
    actions.setGlobalState({ token: 'new value' })
  },
}
</script>
